package thesis.database;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * This class use for Taxi object.
 * 
 * @author La Duy Khang - Dinh Tran Ly Hung -Tang Thi Phuong Linh
 * @version 1.0
 */
public class Taxi implements Serializable {
	private int taxiId;
	private String imei;
	private int numberOfSeat;
	private String numberPlate;
	private String description;
	private int status;
	private String newestLongitude;
	private String newestLatitude;
	private Timestamp expirationTime;
	private String simNumber;
	private int displayColor;
	private String ipAddress;
	private int portListen;
	private boolean active;
	private Timestamp creationTime;
	private Timestamp lastUpdate;
	private String gpsData;
	private String driverName;
	private String driverPhone;
	private String driverEmail;
	private Timestamp driverBirthday;
	private String driverLicenseType;
	private Timestamp driverExpireDay;
	private String driverLicenseCode;
	private int driverShiftNumber;
	private Timestamp driverDateStart;
	private String driverIdentifyNumber;

	public Taxi(int taxiId, String imei, int numberOfSeat, String numberPlate,
			String description, int status, String newestLongitude,
			String newestLatitude, Timestamp expirationTime, String simNumber,
			int displayColor, String ipAddress, int portListen, boolean active,
			Timestamp creationTime, Timestamp lastUpdate, String gpsData,
			String driverName, String driverPhone, String driverEmail,
			Timestamp driverBirthday, String driverLicenseType,
			Timestamp driverExpireDay, String driverLicenseCode,
			int driverShiftNumber, Timestamp driverDateStart,
			String driverIdentifyNumber) {
		this.taxiId = taxiId;
		this.imei = imei;
		this.numberOfSeat = numberOfSeat;
		this.numberPlate = numberPlate;
		this.description = description;
		this.status = status;
		this.newestLatitude = newestLatitude;
		this.newestLongitude = newestLongitude;
		this.expirationTime = expirationTime;
		this.simNumber = simNumber;
		this.ipAddress = ipAddress;
		this.displayColor = displayColor;
		this.portListen = 0;
		this.active = active;
		this.creationTime = creationTime;
		this.lastUpdate = lastUpdate;
		this.gpsData = gpsData;
		this.driverName = driverName;
		this.driverPhone = driverPhone;
		this.driverEmail = driverEmail;
		this.driverBirthday = driverBirthday;
		this.driverLicenseType = driverLicenseType;
		this.driverExpireDay = driverExpireDay;
		this.driverLicenseCode = driverLicenseCode;
		this.driverShiftNumber = driverShiftNumber;
		this.driverDateStart = driverDateStart;
		this.driverIdentifyNumber = driverIdentifyNumber;
	}

	public Taxi() {
		this.taxiId = -1;
		this.imei = "";
		this.numberOfSeat = 4;
		this.numberPlate = "";
		this.description = "";
		this.status = 0;
		this.newestLatitude = "";
		this.newestLongitude = "";
		this.expirationTime = new Timestamp((new Date().getTime()));
		this.simNumber = "";
		this.displayColor = -1;
		this.ipAddress = "";
		this.portListen = 0;
		this.active = false;
		this.creationTime = new Timestamp((new Date().getTime()));
		this.lastUpdate = new Timestamp((new Date().getTime()));
		this.gpsData = "";
		this.driverName = "";
		this.driverPhone = "";
		this.driverEmail = "";
		this.driverBirthday = new Timestamp((new Date().getTime()));
		this.driverLicenseType = "";
		this.driverExpireDay = new Timestamp((new Date().getTime()));
		this.driverLicenseCode = "";
		this.driverShiftNumber = 0;
		this.driverDateStart = new Timestamp((new Date().getTime()));
		this.driverIdentifyNumber = "";
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public int getTaxiId() {
		return taxiId;
	}

	public void setTaxiId(int taxiId) {
		this.taxiId = taxiId;
	}

	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public int getNumberOfSeat() {
		return numberOfSeat;
	}

	public void setNumberOfSeat(int numberOfSeat) {
		this.numberOfSeat = numberOfSeat;
	}

	public String getNumberPlate() {
		return numberPlate;
	}

	public void setNumberPlate(String numberPlate) {
		this.numberPlate = numberPlate;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getNewestLongitude() {
		return newestLongitude;
	}

	public void setNewestLongitude(String newestLongitude) {
		this.newestLongitude = newestLongitude;
	}

	public String getNewestLatitude() {
		return newestLatitude;
	}

	public void setNewestLatitude(String newestLatitude) {
		this.newestLatitude = newestLatitude;
	}

	public Date getExpirationTime() {
		return expirationTime;
	}

	public void setExpirationTime(Date expirationTime) {
		this.expirationTime = new Timestamp(expirationTime.getTime());
	}

	public String getSimNumber() {
		return simNumber;
	}

	public void setSimNumber(String simNumber) {
		this.simNumber = simNumber;
	}

	public int getDisplayColor() {
		return displayColor;
	}

	public void setDisplayColor(int displayColor) {
		this.displayColor = displayColor;
	}

	public int getPortListen() {
		return portListen;
	}

	public void setPortListen(int portListen) {
		this.portListen = portListen;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public Date getCreationTime() {
		return creationTime;
	}

	public void setCreationTime(Date creationTime) {
		this.creationTime = new Timestamp(creationTime.getTime());
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = new Timestamp(lastUpdate.getTime());
	}

	public String getGpsData() {
		return gpsData;
	}

	public void setGpsData(String gpsData) {
		this.gpsData = gpsData;
	}

	public String getDriverName() {
		return driverName;
	}

	public void setDriverName(String driverName) {
		this.driverName = driverName;
	}

	public String getDriverPhone() {
		return driverPhone;
	}

	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
	}

	public String getDriverEmail() {
		return driverEmail;
	}

	public void setDriverEmail(String driverEmail) {
		this.driverEmail = driverEmail;
	}

	public Date getDriverBirthday() {
		return driverBirthday;
	}

	public void setDriverBirthday(Date driverBirthday) {
		if (driverBirthday == null)
			this.driverBirthday = new Timestamp(new Date().getTime());
		else
			this.driverBirthday = new Timestamp(driverBirthday.getTime());
	}

	public String getDriverLicenseType() {
		return driverLicenseType;
	}

	public void setDriverLicenseType(String driverLicenseType) {
		this.driverLicenseType = driverLicenseType;
	}

	public Date getDriverExpireDay() {
		return driverExpireDay;
	}

	public void setDriverExpireDay(Date driverExpireDay) {
		if (driverExpireDay == null)
			this.driverExpireDay = new Timestamp(new Date().getTime());
		else
			this.driverExpireDay = new Timestamp(driverExpireDay.getTime());
	}

	public String getDriverLicenseCode() {
		return driverLicenseCode;
	}

	public void setDriverLicenseCode(String driverLicenseCode) {
		this.driverLicenseCode = driverLicenseCode;
	}

	public int getDriverShiftNumber() {
		return driverShiftNumber;
	}

	public void setDriverShiftNumber(int driverShiftNumber) {
		this.driverShiftNumber = driverShiftNumber;
	}

	public Date getDriverDateStart() {
		return driverDateStart;
	}

	public void setDriverDateStart(Date driverDateStart) {
		if (driverDateStart == null)
			this.driverDateStart = new Timestamp(new Date().getTime());
		else
			this.driverDateStart = new Timestamp(driverDateStart.getTime());
	}

	public String getDriverIdentifyNumber() {
		return driverIdentifyNumber;
	}

	public void setDriverIdentifyNumber(String driverIdentifyNumber) {
		this.driverIdentifyNumber = driverIdentifyNumber;
	}

}
